home *** CD-ROM | disk | FTP | other *** search
/ SGI Developer Toolbox 6.1 / SGI Developer Toolbox 6.1 - Disc 4.iso / src / exampleCode / viewkit / VCal / WeekOverview.h < prev   
Encoding:
C/C++ Source or Header  |  1994-08-02  |  2.6 KB  |  81 lines

  1. /*
  2.  * Copyright (C) 1994, Silicon Graphics, Inc.
  3.  * All Rights Reserved.
  4.  *
  5.  * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  6.  * the contents of this file may not be disclosed to third parties, copied or
  7.  * duplicated in any form, in whole or in part, without the prior written
  8.  * permission of Silicon Graphics, Inc.
  9.  *
  10.  * RESTRICTED RIGHTS LEGEND:
  11.  * Use, duplication or disclosure by the Government is subject to restrictions
  12.  * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  13.  * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  14.  * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  15.  * rights reserved under the Copyright Laws of the United States.
  16.  */
  17. #ifndef _WEEK_OVERVIEW_
  18. #define _WEEK_OVERVIEW_
  19.  
  20. #include <Vk/VkWindow.h>
  21. #include <Vk/VkScroll.h>
  22. #include "TimeEntry.h"
  23. #include "TimeGrid.h"
  24. #include "Utils.h"
  25.  
  26. class VCal;
  27. class Entry;
  28. class TimeWeekdayEntry;
  29.  
  30. class WeekOverview : public VkWindow {
  31. public:
  32.   WeekOverview(VCal *owner, const char *docName);
  33.   ~WeekOverview();
  34.  
  35.   const char *className();
  36.  
  37.   void selectWeek(int day, int month, int year);
  38.   void updateDisplay() { selectWeek(day, month, year); }
  39.  
  40. protected:
  41.   virtual Widget setUpInterface(Widget parent);
  42.   virtual void handleWmDeleteMessage();
  43.   void fileMenu();
  44.   void doQuit();
  45.   void restrictedChanged(Boolean restricted);
  46.   void scrollProc(Widget w, XtPointer client_data, XtPointer call_data);
  47.   void gridCallback(TimeGridCallback *cb);
  48.   void adjustGrid();
  49.   void clearData();
  50.   void addDateEntries(int day, int month, int year, int weekday);
  51.   void addEntry(Entry *entry, int weekday);
  52.   void entryCallback(Widget w, TimeEntryCallback *cb);
  53.   void drawTrough(VkScrollCallback *cb);
  54.   void annotateEntry(TimeEntry *entry, int width, int height, Pixmap pixmap);
  55.   void highlightWeekday(int weekday);
  56.  
  57.   static void quit_menu(Widget w, XtPointer client_data, XtPointer call_data);
  58.   static void restricted_menu(Widget w, XtPointer client_data,
  59.                   XtPointer call_data);
  60.   static void grid_stub(Widget w, XtPointer client_data, XtPointer call_data);
  61.   static void expose_check(Widget w, XtPointer client_data,
  62.                XtPointer call_data);
  63.   static void entry_stub(Widget w, XtPointer client_data, XtPointer call_data);
  64.  
  65.   VCal *owner;
  66.   Widget form, weekLabel, headerArea, headerLabels[DAYS_IN_WEEK];
  67.   int day, month, year;
  68.   int lastDay, lastMonth, lastYear;
  69.   Boolean restricted;
  70.   VkScroll *scroll;
  71.   TimeGrid *grid;
  72.   int timeInterval, subdivisions, timeSlotSnap;
  73.   int restrictStart, restrictEnd, defaultLength;
  74.   TimeWeekdayEntry **entries;
  75.   int numEntries, sizeEntries;
  76.   Boolean dirty;
  77.   GC troughGC;
  78. };
  79.  
  80. #endif
  81.